<!doctype html>
<html class="default no-js">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>JobCompletionInterface | zeebe-node</title>
	<meta name="description" content="Documentation for zeebe-node">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="../assets/css/main.css">
	<script async src="../assets/js/search.js" id="search-script"></script>
</head>
<body>
<header>
	<div class="tsd-page-toolbar">
		<div class="container">
			<div class="table-wrap">
				<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
					<div class="field">
						<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
						<input id="tsd-search-field" type="text" />
					</div>
					<ul class="results">
						<li class="state loading">Preparing search index...</li>
						<li class="state failure">The search index is not available</li>
					</ul>
					<a href="../index.html" class="title">zeebe-node</a>
				</div>
				<div class="table-cell" id="tsd-widgets">
					<div id="tsd-filter">
						<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
						<div class="tsd-filter-group">
							<div class="tsd-select" id="tsd-filter-visibility">
								<span class="tsd-select-label">All</span>
								<ul class="tsd-select-list">
									<li data-value="public">Public</li>
									<li data-value="protected">Public/Protected</li>
									<li data-value="private" class="selected">All</li>
								</ul>
							</div>
							<input type="checkbox" id="tsd-filter-inherited" checked />
							<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
							<input type="checkbox" id="tsd-filter-externals" checked />
							<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
						</div>
					</div>
					<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
				</div>
			</div>
		</div>
	</div>
	<div class="tsd-page-title">
		<div class="container">
			<ul class="tsd-breadcrumb">
				<li>
					<a href="../modules.html">zeebe-node</a>
				</li>
				<li>
					<a href="JobCompletionInterface.html">JobCompletionInterface</a>
				</li>
			</ul>
			<h1>Interface JobCompletionInterface&lt;WorkerOutputVariables&gt;</h1>
		</div>
	</div>
</header>
<div class="container container-main">
	<div class="row">
		<div class="col-8 col-content">
			<section class="tsd-panel tsd-type-parameters">
				<h3>Type parameters</h3>
				<ul class="tsd-type-parameters">
					<li>
						<h4>WorkerOutputVariables</h4>
					</li>
				</ul>
			</section>
			<section class="tsd-panel tsd-hierarchy">
				<h3>Hierarchy</h3>
				<ul class="tsd-hierarchy">
					<li>
						<span class="target">JobCompletionInterface</span>
						<ul class="tsd-hierarchy">
							<li>
								<a href="ZeebeJob.html" class="tsd-signature-type" data-tsd-kind="Interface">ZeebeJob</a>
							</li>
						</ul>
					</li>
				</ul>
			</section>
			<section class="tsd-panel-group tsd-index-group">
				<h2>Index</h2>
				<section class="tsd-panel tsd-index-panel">
					<div class="tsd-index-content">
						<section class="tsd-index-section ">
							<h3>Properties</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="JobCompletionInterface.html#fail" class="tsd-kind-icon">fail</a></li>
							</ul>
						</section>
						<section class="tsd-index-section ">
							<h3>Methods</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-method tsd-parent-kind-interface"><a href="JobCompletionInterface.html#cancelWorkflow" class="tsd-kind-icon">cancel<wbr>Workflow</a></li>
								<li class="tsd-kind-method tsd-parent-kind-interface"><a href="JobCompletionInterface.html#complete" class="tsd-kind-icon">complete</a></li>
								<li class="tsd-kind-method tsd-parent-kind-interface"><a href="JobCompletionInterface.html#error" class="tsd-kind-icon">error</a></li>
								<li class="tsd-kind-method tsd-parent-kind-interface"><a href="JobCompletionInterface.html#forward" class="tsd-kind-icon">forward</a></li>
							</ul>
						</section>
					</div>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Properties</h2>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="fail" class="tsd-anchor"></a>
					<h3>fail</h3>
					<div class="tsd-signature tsd-kind-icon">fail<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span><span class="tsd-signature-symbol">(</span>errorMessage<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, retries<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">JOB_ACTION_ACKNOWLEDGEMENT</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">; </span><span class="tsd-signature-symbol">(</span>failureConfiguration<span class="tsd-signature-symbol">: </span><a href="JobFailureConfiguration.html" class="tsd-signature-type" data-tsd-kind="Interface">JobFailureConfiguration</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">JOB_ACTION_ACKNOWLEDGEMENT</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> }</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in <a href="https://github.com/camunda-community-hub/zeebe-client-node-js/blob/98cac69/src/lib/interfaces-1.0.ts#L163">src/lib/interfaces-1.0.ts:163</a></li>
						</ul>
					</aside>
					<div class="tsd-type-declaration">
						<h4>Type declaration</h4>
						<ul class="tsd-parameters">
							<li class="tsd-parameter-signature">
								<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-interface">
									<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>errorMessage<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, retries<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">JOB_ACTION_ACKNOWLEDGEMENT</span><span class="tsd-signature-symbol">&gt;</span></li>
									<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>failureConfiguration<span class="tsd-signature-symbol">: </span><a href="JobFailureConfiguration.html" class="tsd-signature-type" data-tsd-kind="Interface">JobFailureConfiguration</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">JOB_ACTION_ACKNOWLEDGEMENT</span><span class="tsd-signature-symbol">&gt;</span></li>
								</ul>
								<ul class="tsd-descriptions">
									<li class="tsd-description">
										<div class="tsd-comment tsd-typography">
											<div class="lead">
												<p>Fail the job with an informative message as to the cause. Optionally, pass in a
													value remaining retries. If no value is passed for retries then the current retry
													count is decremented. Pass in <code>0</code>for retries to raise an incident in Operate. Optionally,
													specify a retry backoff period in milliseconds. Default is 0ms (immediate retry) if not
												specified.</p>
											</div>
										</div>
										<h4 class="tsd-parameters-title">Parameters</h4>
										<ul class="tsd-parameters">
											<li>
												<h5>errorMessage: <span class="tsd-signature-type">string</span></h5>
											</li>
											<li>
												<h5><span class="tsd-flag ts-flagOptional">Optional</span> retries: <span class="tsd-signature-type">number</span></h5>
											</li>
										</ul>
										<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">JOB_ACTION_ACKNOWLEDGEMENT</span><span class="tsd-signature-symbol">&gt;</span></h4>
									</li>
									<li class="tsd-description">
										<div class="tsd-comment tsd-typography">
											<div class="lead">
												<p>Fail the job with an informative message as to the cause. Optionally, pass in a
													value remaining retries. If no value is passed for retries then the current retry
													count is decremented. Pass in <code>0</code>for retries to raise an incident in Operate. Optionally,
													specify a retry backoff period in milliseconds. Default is 0ms (immediate retry) if not
												specified.</p>
											</div>
										</div>
										<h4 class="tsd-parameters-title">Parameters</h4>
										<ul class="tsd-parameters">
											<li>
												<h5>failureConfiguration: <a href="JobFailureConfiguration.html" class="tsd-signature-type" data-tsd-kind="Interface">JobFailureConfiguration</a></h5>
											</li>
										</ul>
										<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">JOB_ACTION_ACKNOWLEDGEMENT</span><span class="tsd-signature-symbol">&gt;</span></h4>
									</li>
								</ul>
							</li>
						</ul>
					</div>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Methods</h2>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface">
					<a name="cancelWorkflow" class="tsd-anchor"></a>
					<h3>cancel<wbr>Workflow</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
						<li class="tsd-signature tsd-kind-icon">cancel<wbr>Workflow<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">&quot;JOB_ACTION_ACKNOWLEDGEMENT&quot;</span><span class="tsd-signature-symbol">&gt;</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/camunda-community-hub/zeebe-client-node-js/blob/98cac69/src/lib/interfaces-1.0.ts#L148">src/lib/interfaces-1.0.ts:148</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Cancel the workflow.</p>
								</div>
							</div>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">&quot;JOB_ACTION_ACKNOWLEDGEMENT&quot;</span><span class="tsd-signature-symbol">&gt;</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface">
					<a name="complete" class="tsd-anchor"></a>
					<h3>complete</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
						<li class="tsd-signature tsd-kind-icon">complete<span class="tsd-signature-symbol">(</span>updatedVariables<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">WorkerOutputVariables</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">&quot;JOB_ACTION_ACKNOWLEDGEMENT&quot;</span><span class="tsd-signature-symbol">&gt;</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/camunda-community-hub/zeebe-client-node-js/blob/98cac69/src/lib/interfaces-1.0.ts#L153">src/lib/interfaces-1.0.ts:153</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Complete the job with a success, optionally passing in a state update to merge
									with the process variables on the broker.</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5><span class="tsd-flag ts-flagOptional">Optional</span> updatedVariables: <span class="tsd-signature-type">WorkerOutputVariables</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">&quot;JOB_ACTION_ACKNOWLEDGEMENT&quot;</span><span class="tsd-signature-symbol">&gt;</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface">
					<a name="error" class="tsd-anchor"></a>
					<h3>error</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
						<li class="tsd-signature tsd-kind-icon">error<span class="tsd-signature-symbol">(</span>errorCode<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, errorMessage<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">&quot;JOB_ACTION_ACKNOWLEDGEMENT&quot;</span><span class="tsd-signature-symbol">&gt;</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/camunda-community-hub/zeebe-client-node-js/blob/98cac69/src/lib/interfaces-1.0.ts#L175">src/lib/interfaces-1.0.ts:175</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Report a business error (i.e. non-technical) that occurs while processing a job.
										The error is handled in the process by an error catch event.
									If there is no error catch event with the specified errorCode then an incident will be raised instead.</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>errorCode: <span class="tsd-signature-type">string</span></h5>
								</li>
								<li>
									<h5><span class="tsd-flag ts-flagOptional">Optional</span> errorMessage: <span class="tsd-signature-type">string</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">&quot;JOB_ACTION_ACKNOWLEDGEMENT&quot;</span><span class="tsd-signature-symbol">&gt;</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface">
					<a name="forward" class="tsd-anchor"></a>
					<h3>forward</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
						<li class="tsd-signature tsd-kind-icon">forward<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;JOB_ACTION_ACKNOWLEDGEMENT&quot;</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/camunda-community-hub/zeebe-client-node-js/blob/98cac69/src/lib/interfaces-1.0.ts#L168">src/lib/interfaces-1.0.ts:168</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Mark this job as forwarded to another system for completion. No action is taken by the broker.
									This method releases worker capacity to handle another job.</p>
								</div>
							</div>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">&quot;JOB_ACTION_ACKNOWLEDGEMENT&quot;</span></h4>
						</li>
					</ul>
				</section>
			</section>
		</div>
		<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
			<nav class="tsd-navigation primary">
				<ul>
					<li class=" ">
						<a href="../modules.html">Exports</a>
					</li>
				</ul>
			</nav>
			<nav class="tsd-navigation secondary menu-sticky">
				<ul class="before-current">
				</ul>
				<ul class="current">
					<li class="current tsd-kind-interface tsd-has-type-parameter">
						<a href="JobCompletionInterface.html" class="tsd-kind-icon">Job<wbr>Completion<wbr>Interface</a>
						<ul>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="JobCompletionInterface.html#fail" class="tsd-kind-icon">fail</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-interface">
								<a href="JobCompletionInterface.html#cancelWorkflow" class="tsd-kind-icon">cancel<wbr>Workflow</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-interface">
								<a href="JobCompletionInterface.html#complete" class="tsd-kind-icon">complete</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-interface">
								<a href="JobCompletionInterface.html#error" class="tsd-kind-icon">error</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-interface">
								<a href="JobCompletionInterface.html#forward" class="tsd-kind-icon">forward</a>
							</li>
						</ul>
					</li>
				</ul>
				<ul class="after-current">
				</ul>
			</nav>
		</div>
	</div>
</div>
<footer class="with-border-bottom">
	<div class="container">
		<h2>Legend</h2>
		<div class="tsd-legend-group">
			<ul class="tsd-legend">
				<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
				<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
			</ul>
		</div>
	</div>
</footer>
<div class="container tsd-generator">
	<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>